package com.kd.spring.unit;

import static org.junit.Assert.*;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.kd.spring.service.HelloService;

@RunWith(SpringJUnit4ClassRunner.class) //整合
@ContextConfiguration(locations="classpath:application.xml")//指定配置文件的位置
public class testSpringWithSpringTest {
	@Autowired//自动装配
	private HelloService helloService;

	@Test
	public void testRegiest() {
		helloService.sayHello();
	}

}
